﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Medical.Interstructrue.Migrations
{
    /// <inheritdoc />
    public partial class 修改字段20 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "IssueCode",
                table: "ShelfTables");

            migrationBuilder.DropColumn(
                name: "IssuePerson",
                table: "ShelfTables");

            migrationBuilder.DropColumn(
                name: "IssueStatus",
                table: "ShelfTables");

            migrationBuilder.DropColumn(
                name: "IssueTime",
                table: "ShelfTables");

            migrationBuilder.DropColumn(
                name: "LssueID",
                table: "ShelfTables");

            migrationBuilder.DropColumn(
                name: "PackNumber",
                table: "ShelfTables");

            migrationBuilder.AlterColumn<int>(
                name: "StoresNum",
                table: "WmsStores",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<int>(
                name: "ShelfId",
                table: "WmsStores",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<int>(
                name: "LatticeNum",
                table: "WmsStores",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<int>(
                name: "FloorNum",
                table: "WmsStores",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AddColumn<int>(
                name: "LssueState",
                table: "WmsLssues",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "CleaningState",
                table: "CleaningRegistrations",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "FinishPerson",
                table: "CleaningRegistrations",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "LssueState",
                table: "WmsLssues");

            migrationBuilder.DropColumn(
                name: "CleaningState",
                table: "CleaningRegistrations");

            migrationBuilder.DropColumn(
                name: "FinishPerson",
                table: "CleaningRegistrations");

            migrationBuilder.AlterColumn<int>(
                name: "StoresNum",
                table: "WmsStores",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "ShelfId",
                table: "WmsStores",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "LatticeNum",
                table: "WmsStores",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "FloorNum",
                table: "WmsStores",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "IssueCode",
                table: "ShelfTables",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "IssuePerson",
                table: "ShelfTables",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<int>(
                name: "IssueStatus",
                table: "ShelfTables",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "IssueTime",
                table: "ShelfTables",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<int>(
                name: "LssueID",
                table: "ShelfTables",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "PackNumber",
                table: "ShelfTables",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
